package com.ruoyi.mywork.repository.generator.mapper;

import com.ruoyi.mywork.repository.generator.entity.LocationUserInfo;
import com.ruoyi.mywork.repository.generator.entity.LocationUserInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface LocationUserInfoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @SelectProvider(type=LocationUserInfoSqlProvider.class, method="countByExample")
    long countByExample(LocationUserInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @DeleteProvider(type=LocationUserInfoSqlProvider.class, method="deleteByExample")
    int deleteByExample(LocationUserInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @Delete({
        "delete from location_user_info",
        "where user_id = #{userId,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long userId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @Insert({
        "insert into location_user_info (user_id, nick_name, ",
        "phone_num, avatar, ",
        "report_interval, ctime, ",
        "utime)",
        "values (#{userId,jdbcType=BIGINT}, #{nickName,jdbcType=VARCHAR}, ",
        "#{phoneNum,jdbcType=BIGINT}, #{avatar,jdbcType=VARCHAR}, ",
        "#{reportInterval,jdbcType=INTEGER}, #{ctime,jdbcType=TIMESTAMP}, ",
        "#{utime,jdbcType=TIMESTAMP})"
    })
    int insert(LocationUserInfo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @InsertProvider(type=LocationUserInfoSqlProvider.class, method="insertSelective")
    int insertSelective(LocationUserInfo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @SelectProvider(type=LocationUserInfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="nick_name", property="nickName", jdbcType=JdbcType.VARCHAR),
        @Result(column="phone_num", property="phoneNum", jdbcType=JdbcType.BIGINT),
        @Result(column="avatar", property="avatar", jdbcType=JdbcType.VARCHAR),
        @Result(column="report_interval", property="reportInterval", jdbcType=JdbcType.INTEGER),
        @Result(column="ctime", property="ctime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="utime", property="utime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<LocationUserInfo> selectByExample(LocationUserInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @Select({
        "select",
        "user_id, nick_name, phone_num, avatar, report_interval, ctime, utime",
        "from location_user_info",
        "where user_id = #{userId,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="nick_name", property="nickName", jdbcType=JdbcType.VARCHAR),
        @Result(column="phone_num", property="phoneNum", jdbcType=JdbcType.BIGINT),
        @Result(column="avatar", property="avatar", jdbcType=JdbcType.VARCHAR),
        @Result(column="report_interval", property="reportInterval", jdbcType=JdbcType.INTEGER),
        @Result(column="ctime", property="ctime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="utime", property="utime", jdbcType=JdbcType.TIMESTAMP)
    })
    LocationUserInfo selectByPrimaryKey(Long userId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @UpdateProvider(type=LocationUserInfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("row") LocationUserInfo row, @Param("example") LocationUserInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @UpdateProvider(type=LocationUserInfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("row") LocationUserInfo row, @Param("example") LocationUserInfoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @UpdateProvider(type=LocationUserInfoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(LocationUserInfo row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table location_user_info
     *
     * @mbg.generated Mon Apr 28 22:41:41 CST 2025
     */
    @Update({
        "update location_user_info",
        "set nick_name = #{nickName,jdbcType=VARCHAR},",
          "phone_num = #{phoneNum,jdbcType=BIGINT},",
          "avatar = #{avatar,jdbcType=VARCHAR},",
          "report_interval = #{reportInterval,jdbcType=INTEGER},",
          "ctime = #{ctime,jdbcType=TIMESTAMP},",
          "utime = #{utime,jdbcType=TIMESTAMP}",
        "where user_id = #{userId,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(LocationUserInfo row);
}